<?php
$this->pageTitle = '美味推荐';
?>
<style>
    .bartop { height: 9px; background: url(../images/foot.png) repeat-x top center; position: relative; overflow: hidden; }
    .top-nav { width: 1000px; position: absolute; left: 50%; margin-left: -500px; z-index:99; }
    .top-nav ul li { float: left; margin-right: 32px; padding-top: 20px; }
    .top-nav ul li a { color: #FFFFFF; text-decoration: none; padding:0 5px 5px 5px; }
    .top-nav ul li  a:hover,.top-nav ul li.current a {border-bottom: 4px #FFFFFF solid; }

    .top-nav .mtime-logo { position: absolute; top: -9px; left:50%; margin-left: -105px; width: 210px; height: 52px; box-shadow: 0px 3px 3px rgba(0,0,0,0.3);border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; padding-top: 8px; background: #E5E5E5; }
    .top-nav .mtime-logo a { display: block; width: 136px; height: 43px; background: url(./images/banner2/foot.png) no-repeat 0 -10px; margin:0 auto; }

    .top-nav .curcity,.login {position: absolute; top: 15px; height: 29px; line-height: 29px; color: #FFFFFF; font-size: 14px; text-indent: 10px;border: 1px #CDE4EC solid; border-radius :3px; }
    .top-nav .curcity { right: 100px; width: 104px; background: url(./images/banner2/topbar_02.png) no-repeat 88px 3px; }
    .top-nav .login { right: 0px; }
    .top-nav .login-text,.login-icon { display: block;  float: left; }
    .top-nav .login-text { padding-right: 10px; }
    .top-nav .login-icon {width: 27px; height: 29px; border-left: 1px #CFCFD0 solid; background: url(./images/banner2/topbar_03.png) no-repeat center center;}

    .mtime-box { min-width: 1200px; height: 250px; position: relative; overflow: hidden; }
    .mtime-box .bd{ width:100% !important; }
    .mtime-box .bd li .m-width {width: 1222px;padding-top: 0px; margin:0 auto; overflow: hidden; }
    .mtime-box .bd li { width:100% !important; height: 250px; }
    .mtime-box .bd li a { display: block;height:239px; width:1200px;background: url(./images/banner2/index_shadow.png) no-repeat 0 0; background-size: auto; padding: 11px 11px 0 11px; }

    .mtime-btn { width: 1222px; position: absolute; top: 200px; left: 50%; margin-left: -611px; }
    .mtime-btn a { display: block; width: 49px; height: 104px; position: absolute; top: 0; filter: alpha(opacity=40); -moz-opacity: 0.4; -khtml-opacity: 0.4; opacity: 0.4; }
    .mtime-btn a.prev { left: -30px; background: url(./images/banner2/foot.png) no-repeat -1822px -9px; } 
    .mtime-btn a.next { right: -30px; background: url(./images/banner2/foot.png) no-repeat right -9px; }

    .mtime-box .hd {position: absolute; top: 240px; right: 10px; }
    .mtime-box .hd ul li { width: 12px; height: 12px; border-radius :50%; text-indent: -9999px; margin-right: 20px; background: #A0A1A4; border: 1px #A0A1A4 solid; float: left; cursor: pointer; }
    .mtime-box .hd ul li.on { background:  #FFFFFF; }

    .indexcontent { width: 1222px; background: url(./images/banner2/index_shadow.png) no-repeat 0 -310px; margin:0 auto; }
    .indexcontent .i_content { width: 1180px;background: #FFFFFF; position: relative; margin: -35px auto 0 auto; padding:10px;}
</style>
<div class="mtime-box">
    <div class="bd">
        <ul>
            <li style="background: url(./images/banner2/img1.jpg) no-repeat center center">
                <div class="m-width">
                    <a href="#"></a>
                </div>
            </li>
        </ul>
    </div>
    <!--    <div class="mtime-btn">
            <a class="prev" href="javascript:;"></a>
            <a class="next" href="javascript:;"></a>
            <div class="hd"><ul></ul></div>
        </div>-->
</div>
<div class="indexcontent">
    <div class="i_content">
        <div class="xbinc">
            <ul class="cl index_hot">
                <?php foreach ($model as $key => $value) { ?>
                    <?php if ($value['status'] == 1) { ?>
                        <li class="foodlayer" id="p<?php echo $value['id']; ?>">
                            <div class="food_img">
                                <a href="<?php echo Yii::app()->createUrl('site/product', array('id' => $value['productSkuId'])); ?>">
                                    <img src="<?php echo $value['productImg']['0']; ?>" align="absmiddle"/>
                                    <span class="areatips"></span>
                                    <span class="areatips_txt"><?php echo $value['restaurantName']; ?></span>
                                </a>
                            </div>
                            <div class="food_desc">
                                <h3><a href="<?php echo Yii::app()->createUrl('site/product', array('id' => $value['productSkuId'])); ?>"><?php echo $value['name']; ?></a></h3>
                                <p>￥<b><?php echo number_format($value['skuPrice'], 2); ?></b><span>门店价&nbsp;<i>￥<?php echo number_format($value['oriPrice'], 2); ?></i></span></p>
                            </div>
                            <div class="food_footer cl">
                                <div class="z sellnum">已售<b><?php echo $value['saleCount']; ?></b></div>
                                <div class="y eva">
                                    <a href="<?php echo Yii::app()->createUrl('site/product', array('id' => $value['productSkuId'], '#' => 'tab2')); ?>" class="cl" target="tab2">
                                        <span class="starbg z" style="margin:6px 10px 0px 0px;">
                                            <span class="starcover" style="width:80%;"></span>
                                        </span>
                                        <span class="z"><?php echo $value['commontCount']; ?>&nbsp;人评价</span>
                                    </a>
                                </div>
                            </div>
                        </li>
                        <?php
                    }
                }
                ?>
            </ul>
        </div>
    </div>
    <div class="wp">
        <div class="weekinc tm20">
            <span>灵动一周美食精选</span>
        </div>
        <div class="introduce cl">
            <div class="intimg">
                <ul class="cl">
                    <?php foreach ($row_ol as $key => $value) { ?>
                        <?php if ($value['status'] == 1) { ?>
                            <li<?php if ($key == 0): ?> class="fst"<?php endif; ?> id="p<?php echo $value['id']; ?>">
                                <a href="<?php echo Yii::app()->createUrl('site/product', array('id' => $value['productSkuId'])); ?>">
                                    <img src="<?php echo $value['productImg']['0']; ?>" width="<?php echo $key == 0 ? '460' : '230'; ?>" height="<?php echo $key == 0 ? '300' : '145'; ?>"/>
                                    <div class="names"><?php echo $value['name']; ?></div>
                                </a>
                            </li>
                            <?php
                        }
                    }
                    ?>
                </ul>
            </div>
        </div>
        <div class="sweetlayer tm10">
            <ul class="cl sweetul">
                <?php foreach ($row_summer as $key => $value) { ?>
                    <?php if ($value['status'] == 1) { ?>
                        <li<?php if ($key == 0): ?> class="fst"<?php endif; ?> id="p<?php echo $value['id']; ?>">
                            <a href="<?php echo Yii::app()->createUrl('site/product', array('id' => $value['productSkuId'])); ?>">
                                <img src="<?php echo $value['productImg']['0']; ?>" width="288" height="200"/>
                                <div class="names"><?php echo $value['name']; ?></div>
                            </a>
                        </li>
                        <?php
                    }
                }
                ?>
            </ul>
        </div>
    </div>
</div>
<div class="wp">

</div>
<script type="text/javascript">
//    $(".prev,.next").hover(function() {
//        $(this).stop(true, false).fadeTo("show", 0.9);
//    }, function() {
//        $(this).stop(true, false).fadeTo("show", 0.4);
//    })
//    $(".mtime-box").slide({
//        titCell: ".hd ul",
//        mainCell: ".bd ul",
//        effect: "fold",
//        interTime: 3500,
//        delayTime: 500,
//        autoPlay: true,
//        autoPage: true,
//        trigger: "click"
//    });
</script>